package org.gurms.dao.po.system;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="sys_param")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysParam implements Serializable {
	private String paramid;
	private String paramvalue;
	private String paramstatus;
	private String modifyflag;
	private String remark;

	@Id
	public String getParamid() {
		return paramid;
	}

	public void setParamid(String paramid) {
		this.paramid = paramid;
	}

	public String getParamvalue() {
		return paramvalue;
	}

	public void setParamvalue(String paramvalue) {
		this.paramvalue = paramvalue;
	}

	@Column(columnDefinition="default '1'")
	public String getParamstatus() {
		return paramstatus;
	}

	public void setParamstatus(String paramstatus) {
		this.paramstatus = paramstatus;
	}

	@Column(columnDefinition="default '1'")
	public String getModifyflag() {
		return modifyflag;
	}

	public void setModifyflag(String modifyflag) {
		this.modifyflag = modifyflag;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public boolean equals(Object o){
		if(o == null || !(o instanceof SysParam)){
			return false;
		}else{
			SysParam param = (SysParam)o;
			if(param.getParamid() == null){
				return false;
			}else{
				return param.getParamid().equals(paramid);
			}
		}
	}
	
	public int hashCode(){
		if(paramid == null)
			return super.hashCode();
		return paramid.hashCode();
	}

}
